<template>
    <div>{{ state.obj }}</div>
</template>

<script lang="ts">
export default { name: '' }
</script>

<script lang="ts" setup>
import { getCurrentInstance, ComponentInternalInstance, reactive, ref, nextTick, onMounted, useAttrs, useSlots, watchEffect } from 'vue'

// const slots = useSlots()
// const attrs = useAttrs()
// const emits = defineEmits()
const { proxy } = getCurrentInstance() as ComponentInternalInstance

const state = reactive({
    obj: {
        a: 1
    }
})

watchEffect(() => {
    console.log(state.obj.a)
})

setTimeout(() => {
    // state.obj.a = 2
    state.obj = { b: 3 }
    setTimeout(() => {
        state.obj = { b: 3 }
    }, 2000)
}, 2000)

// defineExpose({

// })
</script>
<style lang="scss" scoped></style>
